package com.lx.pc.service;

public class RedisKeyGenerator {

	protected static transient final String CONST_UNDERLINED = "_";

	private static RedisKeyGenerator instance = new RedisKeyGenerator();

	private RedisKeyGenerator() {
	}

	public static RedisKeyGenerator getInstance() {
		return instance;
	}
	
	public String getUserInfoKey(String id) {
		StringBuffer buffer = new StringBuffer();
		buffer.append("USER_INFO");
		buffer.append(CONST_UNDERLINED);
		buffer.append(id);
		return buffer.toString();
	}
	
	public String getOrderKey(String key) {
		StringBuffer buffer = new StringBuffer();
		buffer.append("ORDER_INFO");
		buffer.append(CONST_UNDERLINED);
		buffer.append(key);
		return buffer.toString();
	}
}
